package com.atguigu.gmall.cart.client;


import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.cart.CartInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(name = "service-cart")
public interface CartFeignClient {


    @GetMapping("/api/cart/addToCart/{skuId}/{skuNum}")
    public Result addToCart(
            @PathVariable(name = "skuId") Long skuId,
            @PathVariable(name = "skuNum") Integer skuNum
    );

    //查询已经选中的购物车中商品
    @GetMapping("/api/cart/getCartCheckedList/{userId}")
    public List<CartInfo> getCartCheckedList(@PathVariable(name = "userId") String userId);
}
